package com.example.tests.pages;

import org.openqa.selenium.By;
import factories.MyPageFactory;


public class HomePage extends MainTemplate {
	@Override
	public boolean isOnThisPage() {
		return 0 < driver.findElements(By.xpath( "//div[ @class = 'center' ]/nav" )).size();
	}
	
	@Override
	public void tryToOpen() {
		MyPageFactory.getPage(driver, LoginPage.class)
				.loginSuccesfullAs("admin", "admin")
				.goHomePage();
	}
}
